
import './index.css'
import { Tabs } from 'antd-mobile'
import { useTab } from './useTab'
import HomeList from './HomeList'

function Home() {

    const { channelsList } = useTab()

    return <>
        <div className='tabContainer'>
            <Tabs defaultActiveKey={'0'}>
                {channelsList.map(item => (
                    <Tabs.Tab title={item.name} key={item.id}>
                        <div className="listContainer">
                            <HomeList channel_id={`${item.id}`} />
                        </div>
                    </Tabs.Tab>
                ))}

            </Tabs>
        </div>
    </>
}

export default Home